// index.js
// 获取应用实例
const app = getApp()
const API = require("../../http/API")
const http = require("../../http/http")
Page({
  data: {
    lunbo: [{ img: "https://ss.lanqb.com/o_1f7ikfhal1thi1il7vo4q3u1r4s7.png?imageView2/1/w/750/h/298" }, { img: "https://ss.lanqb.com/o_1f7as3kuv12rdimaijk24kgm57.jpg?imageView2/1/w/750/h/298" }, { img: "https://ss.lanqb.com/o_1gmks9b6t93qmlo16lieo4pgh1b.jpg?imageView2/1/w/750/h/298" }, { img: "https://ss.lanqb.com/o_1ftph7r52uvu1s2q1sgq1p18nsa1c.png?imageView2/1/w/750/h/298" }, { img: "https://ss.lanqb.com/o_1gmhuo0l4165b9111h576kt3h3s.jpg?imageView2/1/w/750/h/298" }],
    Bigtouch: [],
    urlImage: [
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h9-b_1806.png",
        text: "免费教程"
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h12-g_1806.png",
        text: '专业课程'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h2-p_2212.png",
        text: '大触直播'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h10-o_1806.png",
        text: '教程兑换'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h11-c_2212.png",
        text: '学员成长'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h11-c_1811.png",
        text: '每日一画'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h14-r_2212.png",
        text: '素材下载'
      },
      {
        img: "https://assets-cdn.lanqb.com/imgv3_m/images-icon/submenu/h5-p_2211.png",
        text: '社区问答'
      }
    ],
    hotTeachs: [],
    LearnData: [],
    Qalist: [],
    Dow: [],
    btnimg:[{img:"https://assets-cdn.lanqb.com/image/footer/footer-icon1_124x47.png"},{img:"https://assets-cdn.lanqb.com/image/footer/footer-icon5@2x.png"},{img:"https://assets-cdn.lanqb.com/image/footer/footer-icon2@2x.png"},{img:"https://assets-cdn.lanqb.com/image/footer/footer-icon3@2x.png"},{img:"https://xyt.xcc.cn/img/icon/icon8.png"}],
  },

  onLoad() {
    http(API.hotTeach).then(res => {
      this.setData({
        hotTeachs: res.data
      })
    })
    // qa_list
    // 大触直播
    http(API.LearnData, { live: 3, is_live: 1, limit: 2, page: 1 }).then(res => {
      this.setData({
        LearnData: res.data
      })
    })

    http(API.Qalist).then(res => {
      this.setData({
        Qalist: res.data.slice(0, 3)
      })
    })

    http(API.Dow).then(res => {
      this.setData({
        Dow: res.data.data.slice(0,3)
      })
      console.log(this.data.Dow);
    })
    // https://m.lanqb.com/api/daniu?link=paging&live=3&is_live=1&limit=3&page=1
    // 
  },
  

})
